
export default function useDelTodo(todoRef){


    // 单个删除
    const delTodo = (index) => {
        todoRef.value.splice(index,1)
    }
    // 全部完成删除
    const allTodo= () => {
        todoRef.value = todoRef.value.filter(v => !v.completed)
    }
  return {
    delTodo,
    allTodo
  }
}